package com.legal.app.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.legal.app.domain.Lawyer;
import com.legal.app.domain.LawyerComment;
import com.legal.app.domain.User;
import com.legal.app.domain.vo.LawyerHomeVO;
import com.legal.app.domain.vo.LawyerVO;
import org.apache.ibatis.annotations.Param;

/**
 * 律师Mapper接口
 * 
 * @author ALe
 * @date 2025-05-30
 */
public interface LawyerMapper extends BaseMapper<Lawyer>
{
    /**
     * 查询律师
     * 
     * @param id 律师主键
     * @return 律师
     */
    public Lawyer selectLawyerById(Long id);

    /**
     * 查询律师列表
     * 
     * @param lawyer 律师
     * @return 律师集合
     */
    public List<Lawyer> selectLawyerList(Lawyer lawyer);

    /**
     * 新增律师
     * 
     * @param lawyer 律师
     * @return 结果
     */
    public int insertLawyer(Lawyer lawyer);

    /**
     * 修改律师
     * 
     * @param lawyer 律师
     * @return 结果
     */
    public int updateLawyer(Lawyer lawyer);

    /**
     * 删除律师
     * 
     * @param id 律师主键
     * @return 结果
     */
    public int deleteLawyerById(Long id);

    /**
     * 批量删除律师
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteLawyerByIds(Long[] ids);

    /**
     * 查询首页在线律师列表VO
     * @param pageSize 每页数量
     * @param pageNum 页码
     * @return 首页律师列表VO
     */
    List<LawyerHomeVO> selectHomeLawyerList(
            @Param("pageSize") Integer pageSize,
            @Param("pageNum") Integer pageNum);

    /**
     * 查询在线律师总数
     * @return 在线律师数量
     */
    int countOnlineLawyers();
    /**
     * 根据条件查询律师列表VO
     * @param vo 查询条件
     * @return 律师列表VO
     */
    List<LawyerHomeVO> selectLawyerByCondition(@Param("vo") LawyerHomeVO vo);

    /**
     * 根据手机号查询用户信息
     * @param phoneNumber 手机号
     * @return 用户信息
     */
    User selectByPhoneNumber(@Param("phoneNumber") String phoneNumber);
    /**
     * 根据律师ID查询律师详情VO
     * @param lawyerId 律师ID
     * @return 律师详情VO
     */
    LawyerVO selectLawyerDetailById(Long lawyerId);

    /**
     * 查询律师评论列表
     *
     * @param lawyerComment 律师评论
     * @return 律师评论集合
     */

}
